import service from "../utils/request";

interface Iparams {
  username: string | number;
  password: string | number;
}

export function loginWeb(data: Iparams) {
  return service.request({
    method: "post",
    url: "/login",
    data,
  });
}
export function getJsonSun() {
  return service.request({
    method: "get",
    url: "/static/dataSun.json",
  });
}
// 获取本地group-bar-chart json数据
export function getBarJson() {
  return service.request({
    method: "get",
    url: "/static/databybar.json",
  });
}
// 获取本地group-bar-key json 数据
export function getBarKeyJson() {
  return service.request({
    method: "get",
    url: "/static/keys.json",
  });
}
// 获取本地group-bar-key json 数据
export function getBarLineJson() {
  return service.request({
    method: "get",
    url: "/static/barLine.json",
  });
}
// 获取本地旭日图json数据
export function getJson() {
  return service.request({
    method: "get",
    url: "/static/sunburst-20220222-All.json",
  });
}
// 获取本地Completedjson 数据
export function getCompleted() {
  return service.request({
    method: "get",
    url: "/static/sunburst-20220222-Completed.json",
  });
}
// 获取本地Ongoing 数据
export function getOngoing() {
  return service.request({
    method: "get",
    url: "/static/sunburst-20220222-Ongoing.json",
  });
}

